package netWorkPrograming.tcp.tcp04;

import java.io.IOException;
import java.net.ServerSocket;
import java.net.Socket;

/**
 * @author yangwenqi
 * @decs TODO
 * @date 2025/5/27
 */
public class ServerDemo {
    public static void main(String[] args) throws IOException {
        System.out.println("-----------------客户端---------------");
        ServerSocket ss=new ServerSocket(8000);
        System.out.println("服务端监听端口号：8000");
        Socket s=ss.accept();
        System.out.println("客户端已接入");
        new Thread(new ReaderThread(s)).start();
        new Thread(new WriterThread(s)).start();
        ss.close();
    }
}
